<template id="">
    <div class="header">
      <div class="header-left">
        <span class="iconfont back-icon">&#xe608;</span>
      </div>
      <div class="header-input">
        <span class="iconfont">&#xe62b;</span>
        输入城市/景点/主题
      </div>
    <router-link to="/city">
      <div class="header-right">
        {{this.city}}
      </div>
    </router-link>
    </div>
</template>

<script type="text/javascript">
import { mapState } from 'vuex'

export default {
  name: 'HomeHeader',
  props: {
  },
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style media="screen" lang="stylus" scoped>
  @import '~styles/varibles.styl'
  .header
    display:flex
    line-height: .86rem
    height:.86rem
    background:$bgColor
    color:#fff
    .header-left
      width:.64rem
      float:left
      .back-icon
        margin-left: .15rem
        font-size: .40rem
    .header-input
      flex:1
      min-width: 148px
      margin-top: .12rem
      padding-left: .2rem
      margin-left: .2rem
      line-height: .64rem
      height: .64rem
      color:#ccc
      background: #fff
      border-radius: .1rem
      position: relative;
      .input
          position: absolute;
          top: 0;
          left: 0;
    .header-right
      min-width:1rem
      float right
      color: #fff
      padding-left: .1rem
      padding-right: .4rem
      text-align: center
      position: relative
      &:after //after伪类制作向下箭头
        border:.13rem solid transparent
        border-top-color: #fff
        content: ""
        position: absolute;
        font-size: 0
        top: 18px
        right: 7px
</style>
